package cn.flc.mapper;

import cn.flc.bean.User;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface UserMapper {
    /**
    *author 枫落尘
     判断是否登录成功
    */
    @Select("select * from user where username=#{username} and password=#{password}")
    User select(@Param("username") String username,@Param("password") String password);
    /**
    *author 枫落尘
     * 判断是否用户已近存在
    */
    @Select("select * from user where username=#{username}")
    User selectByUserName(@Param("username") String username);
    /**
    *author 枫落尘
     * 添加用户
    */
    @Select("insert into user values(null,#{username},#{password})")
    void add(User user);
}
